package com.njtoyo.taxi.admin.mapper.secondary.mapper.data;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.njtoyo.taxi.admin.library.Const;
import com.njtoyo.taxi.admin.mapper.secondary.entity.data.CallTaxiKpi;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.Date;
import java.util.List;
import java.util.Map;

@Repository
@DS(Const.SECONDARY_DS)
public interface CallTaxiKpiMapper extends BaseMapper<CallTaxiKpi> {


    List<Map<String, Object>> selectRideByHour(@Param("dateStr") String dateStr, @Param("cantonId") Integer cantonId);

    List<Map<String, Object>> selectFinishRideByDayOfMonth(@Param("cantonId") Integer cantonId, @Param("startDate") String startDate, @Param("endDate") String endDate);

    List<Map<String, Object>> get30DayOfCallAndFinish(@Param("cantonId") Integer cantonId, @Param("startDate") String startDate, @Param("endDate") String endDate);

    List<Map<String, Object>> selectDrverRealTimeSendAndGrapByDay(@Param("cantonId") Integer cantonId, @Param("startDate") String startDate, @Param("endDate") String endDate);

    List<Map<String, Object>> selectRealTimeRepeatCallNum(@Param("cantonId") Integer cantonId, @Param("startDate") String startDate, @Param("endDate") String endDate);

    List<Map<String, Object>> selectSendDriverMQTTByHour(@Param("dateStr") String dateStr, @Param("cantonId") Integer cantonId);

    List<Map<String, Object>> selectDriverGrabByHour(@Param("dateStr") String dateStr, @Param("cantonId") Integer cantonId);

    List<Map<String, Object>> getPickRate(@Param("dateStr") String dateStr, @Param("cantonId") Integer cantonId);

    List<Map<String, Object>> getFinishRates(@Param("dateStr") String dateStr, @Param("cantonId") Integer cantonId);
}
